﻿@model SAIM.Models.TicketData
@using MvcFileUploader.HtmlHelper
@using MvcFileUploader.Models
@{
    Layout = "~/Views/Shared/_LayoutFile.cshtml";
    ViewBag.Title = "Formato de reporte de ticket";
}
@section css {
    @Styles.Render("~/Content/File")
}
<div class="row saim-file-header page-header">
    <div class="col-xs-3">
        <img src="@Server.MapPath("~/Content/Images/LogoMetalurgia.png")" class="img-rounded center-block" alt="Instituto de Metalurgia" width="240" height="80">
    </div>
    <div class="col-xs-6">
        <p class="text-center">Universidad Autónoma de San Luis Potosí</p>
        <p class="text-center">Instituto de Metalurgia</p>
        <p class="text-center">Sistema Administrativo</p>
        <p class="text-center">@ViewBag.Title</p>
    </div>
    <div class="col-xs-3">
        <img src="@Server.MapPath("~/Content/Images/LogoUASLP.png")" class="img-rounded center-block" alt="Instituto de Metalurgia" width="100" height="100">
    </div>
</div>
<div class="panel panel-info">
    <div class="panel-heading">
        <div class="row">
            <div class="col-xs-6">Información del ticket</div>
            <div class="col-xs-6">Información del usuario solicitante</div>
        </div>
    </div>
    <div class="panel-body">
        <div class="row">
            <div class="col-xs-6">
                <dl class="dl-horizontal">
                    <dt>Número de ticket:</dt>
                    <dd>@Model.IdTicket</dd>
                </dl>
                <dl class="dl-horizontal">
                    <dt>Área:</dt>
                    <dd>@Model.Area</dd>
                </dl>
                <dl class="dl-horizontal">
                    <dt>Servicio:</dt>
                    <dd>@Model.Issue</dd>
                </dl>
                <dl class="dl-horizontal">
                    <dt>Fecha y hora:</dt>
                    <dd>@Model.TicketDate</dd>
                </dl>
                <dl class="dl-horizontal">
                    <dt>Estatus:</dt>
                    <dd>@Model.Status</dd>
                </dl>
            </div>
            <div class="col-xs-6">
                <dl class="dl-horizontal">
                    <dt>Usuario:</dt>
                    <dd>@Model.UserName</dd>
                </dl>
                <dl class="dl-horizontal">
                    <dt>UPN:</dt>
                    <dd>@Model.RPE</dd>
                </dl>
                <dl class="dl-horizontal">
                    <dt>Correo electrónico:</dt>
                    <dd>@Model.Email</dd>
                </dl>
            </div>
        </div>
    </div>
</div>
<div class="panel panel-info">
    <div class="panel-heading">
        Detalle del ticket
    </div>
    <div class="panel-body">
        <p class="list-group-item-text">@MvcHtmlString.Create(Model.Details.Replace(Environment.NewLine, "<br />"))</p>
    </div>
</div>

<div class="panel panel-info">
    <div class="panel-heading">
        Comentarios
    </div>
    <div class="panel-body">
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-12">
                    <h4 class="list-group-item-heading">@Model.UserName</h4>
                    <h5 class="list-group-item-heading">@Model.TicketDate</h5>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12">
                    <p class="list-group-item-text">@MvcHtmlString.Create(Model.Details.Replace(Environment.NewLine, "<br />"))</p>
                </div>
            </div>
            @foreach (SAIM.Models.TicketComment element in Model.Comments)
            {
                if (!element.IsPrivate)
                {
                <hr />
                <div class="form-group">
                    <div class="col-sm-8">
                        <h4 class="list-group-item-heading">@element.UserName</h4>
                        <h5 class="list-group-item-heading">@element.CommentDate</h5>
                    </div>
                </div>
                <div class="form-group">
                    <div class="comment-area col-sm-12">
                        <p class="list-group-item-text">@MvcHtmlString.Create(element.Comment.Replace(Environment.NewLine, "<br />"))</p>
                    </div>
                </div>
                }
            }
        </form>
    </div>
</div>